import os
import shutil

def create_directory_structure():
    # 定义目录结构
    directories = [
        'app/static/css',
        'app/static/js',
        'app/static/images',
        'app/static/downloads',
        'app/templates/auth',
        'app/templates/data',
        'app/templates/analysis',
        'app/templates/reports',
        'app/templates/main',
        'instance',
        'logs',
        'scripts',
        'app/routes',
        'app/utils'
    ]
    
    # 创建目录
    for directory in directories:
        os.makedirs(directory, exist_ok=True)
        print(f"Created directory: {directory}")
        
    # 创建必要的空文件
    files = [
        'app/__init__.py',
        'app/models.py',
        'app/config.py',
        'app/routes/__init__.py',
        'app/routes/auth.py',
        'app/routes/data.py',
        'app/routes/analysis.py',
        'app/routes/reports.py',
        'app/routes/main.py',
        'run.py',
        'requirements.txt'
    ]
    
    for file in files:
        with open(file, 'a') as f:
            pass
        print(f"Created file: {file}")

if __name__ == '__main__':
    create_directory_structure() 